Most web-based applications today are designed in accordance with the three-tier model. Referring to FIG. 8, the first tier of the three-tier model includes a web client 801, which is typically a browser executing on a personal computer. The web client 801 is in communication via a network 803, e.g. an intranet or Internet, with an application server 811 in the second tier. The web client 801 interacts with the application server 811 using hypertext transfer protocol (HTTP) requests to get web pages and forms from the application server 811 and post data from completed forms to the application server 811. In some implementations, a web server (not shown) is employed to relay the HTTP requests between the network application server 811 and the application server 811.
The application server 811 of the second tier in the three-tier model comprises several components. In particular, the application server 811 includes executable code 813, which is responsible for implementing the procedural aspects of the web-based application. For example, if the web-based application is an on-line catalog, then the executable code 813 would handle the validation and processing of form data received from the web client 801 for purchasing a product, calculation of new results such as shipping costs, and generation of hypertext markup language (HTML) or extensible markup language (XML) output to be sent to the web client 801, for example, to display information about the product or confirming purchase of the product. The executable code 813 is also responsible for managing user session state 815, which includes transient information about the user, such as the user's name or identity, and which pages the user has visited. The session state 815 is typically stored in virtual memory on the application server 811.
Typically, the results of the user's interaction with the web-based application results need to be saved in a persistent memory. For example, if the user of the on-line catalog purchases a product, then the application server 811 will record the user's order using a database server 821 on the third tier. For on-line catalog applications, the database server 821 is commonly an on-line transaction processing (OLTP) database server. The database server 821 stores the information received from the application server 811 as application data 823 in a database. The database server 821 is also configured to fetch previously stored data in response to requests from the application server 811.
Although the three-tier model is popular, the model suffers from several disadvantages. For example, three-tier web applications are not scalable because the number of users is limited by the size of the session state 815. In some implementations, it is not untypical to require 2 MB of session state to handle a single user, particularly when calls to the database server 821 are involved. If there is only a 100 MB of available virtual memory on the application server 811, then there is a maximum of 50 simultaneous users. As web-based applications get more sophisticated, the session state 815 increases, thereby reducing the number of simultaneous users who can use the application server 811 without expensive hardware and memory upgrades.
Therefore, there is a need for a web-based application environment that is scalable in the number of users.